@simon_he/vue-tui 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -28
- package/dist/{TMermaidText-CXm_L969.js → TMermaidText-frVr8Ysb.js} +1 -1
- package/dist/{TSelect-CiyMvwl-.js → TSelect-Dx34M1pF.js} +6 -168
- package/dist/{TTree-DKGiuIcM.js → TTree-DdAjCPHu.js} +12 -13
- package/dist/agent.cjs +3405 -13393
- package/dist/agent.js +15 -1197
- package/dist/{block-source-5CQp4tF8.js → block-source-Crro3mxi.js} +191 -724
- package/dist/cli/input.d.ts +8 -0
- package/dist/cli/video/ffmpeg-frame-source.d.ts +10 -0
- package/dist/cli/video/png-frame-parser.d.ts +4 -0
- package/dist/cli/video/raw-frame-parser.d.ts +1 -0
- package/dist/cli/video/yt-dlp-frame-source.d.ts +11 -0
- package/dist/cli.cjs +142 -33
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +167 -37
- package/dist/core.js +5 -6
- package/dist/create-terminal-app.d.ts +24 -1
- package/dist/{debug-logger-ChY_PXVk.js → debug-logger-CmsGI4of.js} +1 -1
- package/dist/{dom-renderer-DNzmg2As.js → dom-renderer-DXx8fWzD.js} +2 -3
- package/dist/experimental/3d/bun/contributor-avatar-atlas.d.ts +12 -0
- package/dist/experimental/3d/bun/png.d.ts +1 -0
- package/dist/experimental/3d/bun/terminal-badge-scene.d.ts +11 -0
- package/dist/experimental/3d/bun/terminal-badge.wgsl.d.ts +1 -0
- package/dist/experimental/3d/bun/webgpu-renderer.d.ts +26 -0
- package/dist/experimental/3d/bun.cjs +7271 -0
- package/dist/experimental/3d/bun.d.cts +4 -0
- package/dist/experimental/3d/bun.d.ts +4 -0
- package/dist/experimental/3d/bun.js +7390 -0
- package/dist/experimental/video/node.cjs +497 -0
- package/dist/experimental/video/node.d.cts +4 -0
- package/dist/experimental/video/node.d.ts +4 -0
- package/dist/experimental/video/node.js +610 -0
- package/dist/experimental.cjs +3064 -567
- package/dist/experimental.d.cts +5 -0
- package/dist/experimental.d.ts +5 -0
- package/dist/experimental.js +1524 -9
- package/dist/{create-terminal-DXuZ2fci.js → hyperlink-_1FAj7Wq.js} +403 -2
- package/dist/index.js +15 -16
- package/dist/{linkify-CuuquMQT.js → linkify-BjI4zVfY.js} +164 -3
- package/dist/markdown.cjs +2929 -12918
- package/dist/markdown.d.cts +1 -0
- package/dist/markdown.d.ts +1 -0
- package/dist/markdown.js +13 -9
- package/dist/{mermaid-CWto52Wk.js → mermaid-BNhM1jAZ.js} +1 -1
- package/dist/mermaid.js +3 -3
- package/dist/observability.js +2 -2
- package/dist/{path-suggest-fPzRsgPv.js → path-suggest-Dndu4dTi.js} +1 -1
- package/dist/renderer/terminal-graphics.d.ts +1 -0
- package/dist/renderer-dom.js +3 -4
- package/dist/runtime.js +2 -2
- package/dist/terminal-graphics-Bbe83wSr.js +597 -0
- package/dist/{tlog-theme-CopRt9SC.js → tlog-theme-i6S_Oftd.js} +1206 -12
- package/dist/{trace-CYHDKM1m.js → trace-Bh8WnoMo.js} +1 -1
- package/dist/vue/components/T3DViewport.d.ts +473 -0
- package/dist/vue/components/TAgentTerminalGraphic.d.ts +13 -0
- package/dist/vue/components/TVideo.d.ts +291 -0
- package/dist/vue/markdown/math.d.ts +2 -0
- package/dist/vue/video/types.d.ts +39 -0
- package/dist/vue.js +17 -18
- package/package.json +44 -3
- package/dist/hyperlink-B35-O-cW.js +0 -403
- /package/dist/{ansi-palette-CNXqFciC.js → ansi-palette-CH6jc2Z7.js} +0 -0
- /package/dist/{env-DNCzvX8b.js → env-Cl8qmNFN.js} +0 -0
- /package/dist/{frame-perf-BBhE-iuS.js → frame-perf-CHpWhbC4.js} +0 -0
- /package/dist/{path-BI9W15Zt.js → path-mnSgEpCm.js} +0 -0
- /package/dist/{rect-Ng-3eKzF.js → rect-DUpeDfBg.js} +0 -0
- /package/dist/{runtime-D77C03RM.js → runtime-Byf8XXOT.js} +0 -0
- /package/dist/{terminal-selection-CQYr--26.js → terminal-selection-4W1SJj4c.js} +0 -0
- /package/dist/{wheel-scroll-CQ22Hcyj.js → wheel-scroll-DASkEZr-.js} +0 -0
package/README.md
CHANGED
|
@@ -54,20 +54,22 @@ Development, release validation, and documentation builds are run on Node.js 20
|
|
|
54
54
|
|
|
55
55
|
## Entry Points
|
|
56
56
|
|
|
57
|
-
| Import
|
|
58
|
-
|
|
|
59
|
-
| `@simon_he/vue-tui`
|
|
60
|
-
| `@simon_he/vue-tui/core`
|
|
61
|
-
| `@simon_he/vue-tui/renderer/dom`
|
|
62
|
-
| `@simon_he/vue-tui/vue`
|
|
63
|
-
| `@simon_he/vue-tui/runtime`
|
|
64
|
-
| `@simon_he/vue-tui/observability`
|
|
65
|
-
| `@simon_he/vue-tui/cli`
|
|
66
|
-
| `@simon_he/vue-tui/markdown`
|
|
67
|
-
| `@simon_he/vue-tui/mermaid`
|
|
68
|
-
| `@simon_he/vue-tui/experimental`
|
|
69
|
-
| `@simon_he/vue-tui/
|
|
70
|
-
| `@simon_he/vue-tui/
|
|
57
|
+
| Import | Stability | Use it for |
|
|
58
|
+
| ------------------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
59
|
+
| `@simon_he/vue-tui` | Public | Browser-safe terminal core, DOM renderer, stable Vue components, and input host plugin factory |
|
|
60
|
+
| `@simon_he/vue-tui/core` | Public | Terminal core, buffer-facing types, ANSI/theme/path/hyperlink helpers |
|
|
61
|
+
| `@simon_he/vue-tui/renderer/dom` | Public | DOM renderer factory and renderer capabilities |
|
|
62
|
+
| `@simon_he/vue-tui/vue` | Advanced | Extended Vue components, composables, router helpers, and Vue runtime internals |
|
|
63
|
+
| `@simon_he/vue-tui/runtime` | Advanced | Runtime wiring, selection helpers, and clipboard abstraction |
|
|
64
|
+
| `@simon_he/vue-tui/observability` | Advanced | Frame perf store, profiler hooks, and trace helpers |
|
|
65
|
+
| `@simon_he/vue-tui/cli` | Public | Node-only headless Vue app runtime, stdin driver, stdout renderer, path provider, recording, and terminal clipboard helpers |
|
|
66
|
+
| `@simon_he/vue-tui/markdown` | Public | `TMarkdownText`, `TVirtualMarkdown`, markdown parser and layout helpers, streaming markdown block sources |
|
|
67
|
+
| `@simon_he/vue-tui/mermaid` | Public | Optional `beautiful-mermaid` bridge and wrapper for `TMermaidText` |
|
|
68
|
+
| `@simon_he/vue-tui/experimental` | Experimental | `T3DViewport`, `TVideo`, charts, `TVirtualList`, `TTranscriptView`, `TLogView`, TLog companions, and append-only log tooling |
|
|
69
|
+
| `@simon_he/vue-tui/experimental/video/node` | Experimental | Node-only lazy FFmpeg frame source plus optional yt-dlp resolver for supported video pages |
|
|
70
|
+
| `@simon_he/vue-tui/experimental/3d/bun` | Experimental | Bun-only raw WGSL/WebGPU Pull renderers, including the vue-tui terminal badge scene |
|
|
71
|
+
| `@simon_he/vue-tui/agent` | Experimental | Agent/console transcript, tool-call header, log, markdown, virtual list, render plane, and overlay component aggregation |
|
|
72
|
+
| `@simon_he/vue-tui/agent/mermaid` | Experimental | Agent namespace optional `beautiful-mermaid` bridge and wrapper for `TMermaidText` |
|
|
71
73
|
|
|
72
74
|
The stable surface is terminal core, DOM rendering, CLI runtime, basic Vue components, markdown APIs, and the optional Mermaid bridge. High-throughput log, virtualization, and agent/console aggregation APIs stay under `/experimental` or `/agent` until their public surface settles; keep those imports isolated in application code. Use `/agent/mermaid` when agent code wants the optional Mermaid wrapper without changing the `/agent` main entrypoint.
|
|
73
75
|
|
|
@@ -82,6 +84,43 @@ import {
|
|
|
82
84
|
} from "@simon_he/vue-tui/experimental";
|
|
83
85
|
```
|
|
84
86
|
|
|
87
|
+
`T3DViewport` is renderer-agnostic and Pull-based. The bundled WGSL renderer is isolated in the Bun-only entrypoint so browser-safe imports do not load native GPU code:
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
import { T3DViewport } from "@simon_he/vue-tui/experimental";
|
|
91
|
+
import { createTerminalBadge3DRenderer } from "@simon_he/vue-tui/experimental/3d/bun";
|
|
92
|
+
|
|
93
|
+
const renderer = createTerminalBadge3DRenderer();
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Install the optional `bun-webgpu` peer, then run the complete direction-E terminal badge example with `bun run run:3d:terminal`. Drag to orbit and use a two-finger trackpad gesture or mouse wheel to zoom. CLI hover steering requires `createStdinDriver({ enableMouseMotion: true })`.
|
|
97
|
+
|
|
98
|
+
#### `experimental/3d/bun` platform requirements
|
|
99
|
+
|
|
100
|
+
| Requirement | Detail |
|
|
101
|
+
| --------------------------- | ---------------------------------------------------- |
|
|
102
|
+
| Runtime | **Bun only** — Node.js and browser are not supported |
|
|
103
|
+
| `bun-webgpu` peer | Must be installed manually: `bun add bun-webgpu` |
|
|
104
|
+
| macOS x64 / arm64 | ✅ Prebuilt binary available |
|
|
105
|
+
| Linux x64 | ✅ Prebuilt binary available |
|
|
106
|
+
| Windows x64 | ✅ Prebuilt binary available |
|
|
107
|
+
| Linux arm64 / musl (Alpine) | ❌ No prebuilt binary — must build from source |
|
|
108
|
+
|
|
109
|
+
> `T3DViewport` itself (from `/experimental`) has zero native dependencies and works everywhere. Only `experimental/3d/bun` requires Bun and the optional peer. `bun-webgpu` is an experimental library; see [bun-webgpu](https://github.com/kommander/bun-webgpu) for current status.
|
|
110
|
+
|
|
111
|
+
#### Terminal graphics protocol requirements
|
|
112
|
+
|
|
113
|
+
`TVideo` and `T3DViewport` automatically negotiate their output format based on the detected terminal:
|
|
114
|
+
|
|
115
|
+
| Terminal capability | Output quality |
|
|
116
|
+
| ----------------------------------- | ---------------------------------------------- |
|
|
117
|
+
| kitty or iTerm2 protocol | Pixel-accurate frames (PNG) |
|
|
118
|
+
| No graphics protocol (any terminal) | `gray8` ASCII art — functional, lower fidelity |
|
|
119
|
+
|
|
120
|
+
`TAgentTerminalGraphic` (mermaid diagrams, KaTeX math, images) requires kitty, iTerm2, or sixel to render visually; without a protocol it shows the `fallback` text prop. Always provide a meaningful `fallback` value so non-graphical terminals still convey the content.
|
|
121
|
+
|
|
122
|
+
> sixel terminals get graphics for `TAgentTerminalGraphic` but ASCII art for `TVideo` / `T3DViewport` — only kitty and iTerm2 support pixel-accurate video and 3D frames. See [docs/platform-contracts.md](./docs/platform-contracts.md) for the full degradation table.
|
|
123
|
+
|
|
85
124
|
Do not deep import from `@simon_he/vue-tui/dist/...`; only the entry points above are part of the supported package contract.
|
|
86
125
|
|
|
87
126
|
### Migration: Node Host Adapter Moved To `/cli`
|
|
@@ -242,20 +281,21 @@ Unhandled promise rejections stay host-owned by default. Setting `cleanupOnUnhan
|
|
|
242
281
|
|
|
243
282
|
## Components
|
|
244
283
|
|
|
245
|
-
| Area | Import
|
|
246
|
-
| -------------- |
|
|
247
|
-
| Stable layout | `@simon_he/vue-tui`
|
|
248
|
-
| Stable text | `@simon_he/vue-tui`
|
|
249
|
-
| Stable input | `@simon_he/vue-tui`
|
|
250
|
-
| Stable overlay | `@simon_he/vue-tui`
|
|
251
|
-
| Vue extended | `@simon_he/vue-tui/vue`
|
|
252
|
-
| Markdown | `@simon_he/vue-tui/markdown`
|
|
253
|
-
| Mermaid | `@simon_he/vue-tui/mermaid`
|
|
254
|
-
| Experimental | `@simon_he/vue-tui/experimental`
|
|
255
|
-
|
|
|
256
|
-
| Agent
|
|
257
|
-
|
|
|
258
|
-
|
|
|
284
|
+
| Area | Import | Components / APIs |
|
|
285
|
+
| -------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
286
|
+
| Stable layout | `@simon_he/vue-tui` | `TBox`, `TView` |
|
|
287
|
+
| Stable text | `@simon_he/vue-tui` | `TText`, `TLink`, `TLinkifyText` |
|
|
288
|
+
| Stable input | `@simon_he/vue-tui` | `TInput`, `TList`, `TSelect` |
|
|
289
|
+
| Stable overlay | `@simon_he/vue-tui` | `TDialog` |
|
|
290
|
+
| Vue extended | `@simon_he/vue-tui/vue` | `TAnchor`, `TFlex`, `TFlexItem`, `TFlow`, `TRenderPlane`, `TRenderLayer`, `TTransition`, `TInputBox`, `TPathPicker`, `TJsonEditor`, `TMultilineModal`, `TDebugOverlay`, composables, router APIs |
|
|
291
|
+
| Markdown | `@simon_he/vue-tui/markdown` | `TMarkdownText`, `TVirtualMarkdown` |
|
|
292
|
+
| Mermaid | `@simon_he/vue-tui/mermaid` | `beautifulMermaidRenderer`, `TMermaid`, `TMermaidText`, `TBeautifulMermaidText` |
|
|
293
|
+
| Experimental | `@simon_he/vue-tui/experimental` | `TVideo`, `TContributionGraph`, `TLineChart`, `TCandlestickChart`, `TPieChart`, `TVirtualList`, `TTranscriptView`, `TLogView`, `TLogSearchBar`, `TLogLinksPanel`, `TLogScrollbar`, `TLogMinimap` |
|
|
294
|
+
| Video adapter | `@simon_he/vue-tui/experimental/video/node` | `createFfmpegVideoFrameSource`, `createYtDlpVideoFrameSource` |
|
|
295
|
+
| Agent console | `@simon_he/vue-tui/agent` | `TAgentTranscript`, `TToolCallView`, `TToolLogView`, `TVirtualMarkdown`, `TVirtualList`, `TRenderPlane` |
|
|
296
|
+
| Agent Mermaid | `@simon_he/vue-tui/agent/mermaid` | `beautifulMermaidRenderer`, `TMermaid`, `TMermaidText`, `TBeautifulMermaidText` |
|
|
297
|
+
| Runtime | `@simon_he/vue-tui/runtime` | runtime, event, and selection APIs |
|
|
298
|
+
| CLI | `@simon_he/vue-tui/cli` | `createTerminalApp`, `createStdoutRenderer`, `createStdinDriver`, Node host adapters |
|
|
259
299
|
|
|
260
300
|
For streaming Mermaid source, pass `streaming` with `final`. When `streaming=true` and `final=false`, transient renderer errors do not replace the last successfully rendered diagram; if no diagram has rendered yet, `incompleteText` is shown until the source becomes renderable or `final=true` surfaces the final error.
|
|
261
301
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventZIndexContextKey, intersectRect, padEndByCells$1 as padEndByCells, repeatChar, sanitizeInlineText, sanitizeTextBlock, sliceByCells, sliceByCellsRange, spaces, textCellWidth$1 as textCellWidth, translateRect, useLayout, useRenderNode, useTerminal, useTerminalNode, useVisibility, withTextWidthProvider } from "./rect-
|
|
1
|
+
import { EventZIndexContextKey, intersectRect, padEndByCells$1 as padEndByCells, repeatChar, sanitizeInlineText, sanitizeTextBlock, sliceByCells, sliceByCellsRange, spaces, textCellWidth$1 as textCellWidth, translateRect, useLayout, useRenderNode, useTerminal, useTerminalNode, useVisibility, withTextWidthProvider } from "./rect-DUpeDfBg.js";
|
|
2
2
|
import { computed, defineComponent, getCurrentInstance, h, inject, markRaw, onBeforeUnmount, shallowRef, watch } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/vue/components/TMermaidText.ts
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { getPlaneTerminal } from "./
|
|
1
|
+
import { getPlaneTerminal, hasEncodedControl } from "./hyperlink-_1FAj7Wq.js";
|
|
2
2
|
import { charCellWidth } from "./width-GqllnV8C.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { isAbsolutePath, normalizeNewlines, normalizePath, resolvePath } from "./path-BI9W15Zt.js";
|
|
3
|
+
import { DialogContextKey, EventZIndexContextKey, ImeAnchorContextKey, LayoutContextKey, RenderPlaneContextKey, RenderStackKey, TInputPluginsContextKey, TerminalContextKey, forEachTextCellSegment, graphemeRangeAt, hasTextWidthAsciiFastPath, intersectRect, repeatChar, sanitizeInlineText, sanitizeTextBlock, sliceByCells, spaces, textCellWidth$1 as textCellWidth, translateRect, useLayout, useRenderNode, useRenderStack, useTerminal, useTerminalNode, useVisibility, withTextWidthProvider } from "./rect-DUpeDfBg.js";
|
|
4
|
+
import { TText, TView, mergeStyle } from "./linkify-BjI4zVfY.js";
|
|
5
|
+
import { isAbsolutePath, normalizeNewlines, normalizePath, resolvePath } from "./path-mnSgEpCm.js";
|
|
7
6
|
import { computed, defineComponent, h, inject, nextTick, onBeforeUnmount, onMounted, provide, ref, shallowReactive, shallowRef, watch, watchEffect } from "vue";
|
|
8
7
|
|
|
9
8
|
//#region src/vue/components/TRenderPlane.ts
|
|
@@ -462,167 +461,6 @@ function createOverlayFocusStack() {
|
|
|
462
461
|
};
|
|
463
462
|
}
|
|
464
463
|
|
|
465
|
-
//#endregion
|
|
466
|
-
//#region src/vue/components/TText.ts
|
|
467
|
-
function fitText(text, max) {
|
|
468
|
-
if (max <= 0) return "";
|
|
469
|
-
text = sanitizeInlineText(text);
|
|
470
|
-
return sliceByCells(text, max);
|
|
471
|
-
}
|
|
472
|
-
function splitLines(text) {
|
|
473
|
-
return sanitizeTextBlock(text).split("\n");
|
|
474
|
-
}
|
|
475
|
-
function computeDefaultWidth(text) {
|
|
476
|
-
const lines = splitLines(text);
|
|
477
|
-
let max = 0;
|
|
478
|
-
for (const line of lines) max = Math.max(max, textCellWidth(line));
|
|
479
|
-
return max;
|
|
480
|
-
}
|
|
481
|
-
const TText = defineComponent({
|
|
482
|
-
name: "TText",
|
|
483
|
-
props: {
|
|
484
|
-
x: {
|
|
485
|
-
type: Number,
|
|
486
|
-
required: true
|
|
487
|
-
},
|
|
488
|
-
y: {
|
|
489
|
-
type: Number,
|
|
490
|
-
required: true
|
|
491
|
-
},
|
|
492
|
-
zIndex: {
|
|
493
|
-
type: Number,
|
|
494
|
-
default: 0
|
|
495
|
-
},
|
|
496
|
-
value: {
|
|
497
|
-
type: String,
|
|
498
|
-
required: true
|
|
499
|
-
},
|
|
500
|
-
w: {
|
|
501
|
-
type: Number,
|
|
502
|
-
default: void 0
|
|
503
|
-
},
|
|
504
|
-
h: {
|
|
505
|
-
type: Number,
|
|
506
|
-
default: void 0
|
|
507
|
-
},
|
|
508
|
-
style: {
|
|
509
|
-
type: Object,
|
|
510
|
-
default: void 0
|
|
511
|
-
},
|
|
512
|
-
clear: {
|
|
513
|
-
type: Boolean,
|
|
514
|
-
default: true
|
|
515
|
-
},
|
|
516
|
-
wrap: {
|
|
517
|
-
type: Boolean,
|
|
518
|
-
default: false
|
|
519
|
-
},
|
|
520
|
-
depsKey: {
|
|
521
|
-
type: null,
|
|
522
|
-
default: void 0
|
|
523
|
-
}
|
|
524
|
-
},
|
|
525
|
-
setup(props) {
|
|
526
|
-
const { terminal, defaultStyle } = useTerminal();
|
|
527
|
-
const layout = useLayout();
|
|
528
|
-
const { visible, rootProps } = useVisibility();
|
|
529
|
-
const defaultWidth = computed(() => computeDefaultWidth(props.value));
|
|
530
|
-
const lines = computed(() => {
|
|
531
|
-
const w = props.w ?? defaultWidth.value;
|
|
532
|
-
if (w <= 0) return [""];
|
|
533
|
-
if (!props.wrap) return splitLines(props.value).map((l) => fitText(l, w));
|
|
534
|
-
const safe = sanitizeTextBlock(props.value);
|
|
535
|
-
return wrapByCells(safe, w).map((l) => fitText(l, w));
|
|
536
|
-
});
|
|
537
|
-
const absRect = computed(() => {
|
|
538
|
-
const width = props.w ?? defaultWidth.value;
|
|
539
|
-
const height = props.h ?? (props.wrap ? lines.value.length || 1 : lines.value.length || 1);
|
|
540
|
-
const raw = {
|
|
541
|
-
x: props.x,
|
|
542
|
-
y: props.y,
|
|
543
|
-
w: width,
|
|
544
|
-
h: height
|
|
545
|
-
};
|
|
546
|
-
const translated = translateRect(raw, layout.originX, layout.originY);
|
|
547
|
-
if (!layout.clipRect) return translated;
|
|
548
|
-
return intersectRect(translated, layout.clipRect) ?? {
|
|
549
|
-
x: 0,
|
|
550
|
-
y: 0,
|
|
551
|
-
w: 0,
|
|
552
|
-
h: 0
|
|
553
|
-
};
|
|
554
|
-
});
|
|
555
|
-
const fullRect = computed(() => {
|
|
556
|
-
const width = props.w ?? defaultWidth.value;
|
|
557
|
-
const height = props.h ?? (props.wrap ? lines.value.length || 1 : lines.value.length || 1);
|
|
558
|
-
return translateRect({
|
|
559
|
-
x: props.x,
|
|
560
|
-
y: props.y,
|
|
561
|
-
w: width,
|
|
562
|
-
h: height
|
|
563
|
-
}, layout.originX, layout.originY);
|
|
564
|
-
});
|
|
565
|
-
useRenderNode(() => ({
|
|
566
|
-
zIndex: props.zIndex,
|
|
567
|
-
rect: visible.value ? absRect.value : {
|
|
568
|
-
x: 0,
|
|
569
|
-
y: 0,
|
|
570
|
-
w: 0,
|
|
571
|
-
h: 0
|
|
572
|
-
},
|
|
573
|
-
deps: [
|
|
574
|
-
visible.value,
|
|
575
|
-
absRect.value,
|
|
576
|
-
fullRect.value,
|
|
577
|
-
props.value,
|
|
578
|
-
props.w,
|
|
579
|
-
props.h,
|
|
580
|
-
props.wrap,
|
|
581
|
-
props.style,
|
|
582
|
-
defaultStyle.value,
|
|
583
|
-
props.depsKey
|
|
584
|
-
],
|
|
585
|
-
paint: (dirtyRows) => {
|
|
586
|
-
if (!visible.value) return;
|
|
587
|
-
const r = absRect.value;
|
|
588
|
-
if (r.w <= 0 || r.h <= 0) return;
|
|
589
|
-
const full = fullRect.value;
|
|
590
|
-
const style = props.style ?? defaultStyle.value;
|
|
591
|
-
const blank = props.clear ? spaces(r.w) : "";
|
|
592
|
-
const out = lines.value;
|
|
593
|
-
const dx = Math.max(0, Math.floor(r.x - full.x));
|
|
594
|
-
const fullY = Math.floor(full.y);
|
|
595
|
-
const paintRow = (y) => {
|
|
596
|
-
const relY = y - r.y;
|
|
597
|
-
if (relY < 0 || relY >= r.h) return;
|
|
598
|
-
const i = y - fullY;
|
|
599
|
-
if (i < 0 || i >= out.length) {
|
|
600
|
-
if (props.clear) terminal.write(blank, {
|
|
601
|
-
x: r.x,
|
|
602
|
-
y,
|
|
603
|
-
style
|
|
604
|
-
});
|
|
605
|
-
return;
|
|
606
|
-
}
|
|
607
|
-
const src = out[i] ?? "";
|
|
608
|
-
const clipped = dx > 0 ? sliceByCellsRange(src, dx, dx + r.w) : sliceByCells(src, r.w);
|
|
609
|
-
terminal.write(padEndByCells(clipped, r.w), {
|
|
610
|
-
x: r.x,
|
|
611
|
-
y,
|
|
612
|
-
style
|
|
613
|
-
});
|
|
614
|
-
};
|
|
615
|
-
if (!dirtyRows) {
|
|
616
|
-
for (let i = 0; i < r.h; i++) paintRow(r.y + i);
|
|
617
|
-
return;
|
|
618
|
-
}
|
|
619
|
-
for (const y of dirtyRows) paintRow(y);
|
|
620
|
-
}
|
|
621
|
-
}));
|
|
622
|
-
return () => h("span", rootProps);
|
|
623
|
-
}
|
|
624
|
-
});
|
|
625
|
-
|
|
626
464
|
//#endregion
|
|
627
465
|
//#region src/vue/components/TDialog.ts
|
|
628
466
|
function clamp$3(n, min, max) {
|
|
@@ -1865,7 +1703,7 @@ function isAscii(text) {
|
|
|
1865
1703
|
return true;
|
|
1866
1704
|
}
|
|
1867
1705
|
const textCellWidth$1 = textCellWidth;
|
|
1868
|
-
function padEndByCells
|
|
1706
|
+
function padEndByCells(text, width) {
|
|
1869
1707
|
const cells = textCellWidth$1(text);
|
|
1870
1708
|
if (cells >= width) return text;
|
|
1871
1709
|
return text + spaces(width - cells);
|
|
@@ -6114,4 +5952,4 @@ const TSelect = defineComponent({
|
|
|
6114
5952
|
});
|
|
6115
5953
|
|
|
6116
5954
|
//#endregion
|
|
6117
|
-
export { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect,
|
|
5955
|
+
export { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, clamp$1 as clamp, computeCommandPaletteMatchRanges, createOverlayFocusStack, isCommitMention, isWhitespace, mentionChipStyle, padEndByCells, resolveOverlayPlacement, sliceByCellsWindow, textCellWidth$1 as textCellWidth };
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { TERMINAL_RENDER_PLANES, createTerminal, getPlaneTerminal, resetPlaneRowsForRender, scrollPlaneRows } from "./
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { applyWheelScroll, createWheelScrollState, resetWheelScrollState } from "./wheel-scroll-CQ22Hcyj.js";
|
|
1
|
+
import { TERMINAL_RENDER_PLANES, createTerminal, getPlaneTerminal, resetPlaneRowsForRender, sanitizeDomHref, scrollPlaneRows } from "./hyperlink-_1FAj7Wq.js";
|
|
2
|
+
import { DOM_RENDERER_CAPABILITIES, createDomRenderer } from "./dom-renderer-DXx8fWzD.js";
|
|
3
|
+
import { EventZIndexContextKey, ImeAnchorContextKey, LayoutContextKey, RenderStackKey, TInputPluginsContextKey, TPathPickerProviderContextKey, TerminalContextKey, VisibilityContextKey, clearTextCaches, forEachTextCellSegment, formatInlineCellLine, injectionKey, intersectRect, normalizeCellRect, padEndByCells$1 as padEndByCells, sanitizeInlineText, sanitizeTextBlock, sliceByCells, sliceByCellsRange, spaces, textCellWidth$1 as textCellWidth, translateRect, useLayout, useRenderNode, useTerminal, useTerminalNode, useVisibility, withTextRenderPass } from "./rect-DUpeDfBg.js";
|
|
4
|
+
import { TText, TView, TuiThemeContextKey, clamp$1 as clamp, createFrameMailbox, createTheme, defaultActiveStyle, defaultDimStyle, fitCellText, linkifyTextSegments, mergeStyle, repeatToCells, tuiDefaultTheme } from "./linkify-BjI4zVfY.js";
|
|
5
|
+
import { SUPPRESS_TERMINAL_POINTER_DOWN, SUPPRESS_TERMINAL_POINTER_MOVE, SUPPRESS_TERMINAL_POINTER_UP, createEventManager, createRuntime } from "./runtime-Byf8XXOT.js";
|
|
6
|
+
import { framePerfNow, mergeFramePerfReason } from "./frame-perf-CHpWhbC4.js";
|
|
7
|
+
import { createFramePerfStore, createTraceStore } from "./trace-Bh8WnoMo.js";
|
|
8
|
+
import { envFlag, envString, firstNonEmptyEnv } from "./env-Cl8qmNFN.js";
|
|
9
|
+
import { createTerminalSelectionController } from "./terminal-selection-4W1SJj4c.js";
|
|
10
|
+
import { createDebugLogger, isDebugEnabled } from "./debug-logger-CmsGI4of.js";
|
|
11
|
+
import { TBox, TInput, TRenderPlane, resolveOverlayPlacement } from "./TSelect-Dx34M1pF.js";
|
|
12
|
+
import { applyWheelScroll, createWheelScrollState, resetWheelScrollState } from "./wheel-scroll-DASkEZr-.js";
|
|
14
13
|
import { computed, defineComponent, effectScope, getCurrentInstance, h, inject, nextTick, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, provide, ref, shallowReactive, shallowRef, toRef, watch, watchEffect } from "vue";
|
|
15
14
|
|
|
16
15
|
//#region src/observability/tui-profiler.ts
|